The present invention is related to a voltage-comparing device applied in a cursor-control input device, and more particularly, to a voltage-comparing device with an analog-signal converter.
Following the development of the personal computer, peripheral devices of the personal computer also develops vigorously. Now, the software is well used in Window""s interface system and the cursor-control input device becomes an essential peripheral device of the personal computer, wherein a mouse is applied popularly. FIG. 1 depicts a circuit of a prior mouse for detecting the movement of the position and transferring it into a digital control signal, wherein a light-emitting diode 11 provides a light emitted to a photo-transistor 13 and a raster-wheel 12 disposed between light-emitting diode 11 and the photo-transistor 13 rotates in response to the rotation of a ball included in the mouse. The photo-transistor 13 receives a bright/dark photo-signal and outputs a sine-wave-like current signal in response to the light-and shade photo-signal while the emitting light is influenced by the rotation of the raster-wheel 12. FIG. 2(a) illustrates an analog-input-voltage signal Vin transformed by a resistor 14 and FIG. 2(b) illustrates a digital-output-voltage signal Vout obtained in an ideal situation after a comparator 15 formed by an operational amplifier compares the analog input voltage signal Vin with a regulated reference voltage Vref. Accordingly, a follow-up circuit can calculate relative moving distances in X axle and Y axle of the mouse in response to the number of square waves of the digital-output-voltage signal Vout.
However, the prior art always causes a lot of uncontrollable errors during producing photoproducts. Parameter-errors and process-errors of devices also cause the yields of products to be reduced. Referring to FIG. 3, it illustrates signals of the photoproducts in the normal work. After comparing an input signal 30 with a regulated reference voltage 31, the part larger than the reference voltage 31 is defined as a digital signal 1, the part lower than the reference voltage 31 is defined as a digital signal 0 and then a digital signal 32 is obtained. Referring to FIG. 4, it illustrates an error of photoproducts. The photoproduct produces an under-potential-input signal 40 and an over-potential of the input signal 42 due to parameter-errors and process-errors and outputs error output signals 41 and 43 respectively. We can determine that the reduction in the yield is almost caused by above error signals, but not any broken device or error designs, which can be prevented through a good detection. Even though some people try to solve the problem by using more precision devices and machines, those methods increasing a lot of cost still can""t solve the problem and improve the yield.
On the other hand, the effect of the noise during inputting signal is another problem. Referring to FIG. 11(a), it is an amplified drawing illustrating an input-voltage signal Vin similar to the regulated reference voltage Vref. As shown in FIG. 11(b), the digital input-voltage signal Vin and the regulated reference voltage Vref will cause crossover phenomenon several times because of the shift of power level and noises produced by transistor devices and background light. The digital output signals Vout will have abnormal numbers of square waves and that error will cause the follow-up circuit to calculate wrong and make the control cursor of the mouse move incorrectly.
Hence, the main purpose of the present invention is to overcome prior problems and provides a practical and novel voltage-comparing device.
It is one object of the present invention to provide a voltage-comparing device applied in a cursor-control input device.
It is another object of the present invention to provide a voltage-comparing device with an analog-signal converter for reducing the complexity of the circuit, the noise of all devices, and the cost of the voltage-comparing device.
According to the present invention, an analog-signal converter comprises a reference-voltage detecting circuit for outputting a reference-voltage signal in response to an input signal, and a first comparing device for comparing the input signal and the reference-voltage signal to obtain an output digital signal, wherein the reference-voltage detecting circuit comprises a second comparing device for comparing the input signal and a potential-calibrating signal to obtain an index signal,a voltage-follower control device electrically connected with the second comparing device for outputting a potential-control signal and a counting signal in response to the index signal and a pulse signal, a voltage-follower device electrically connected between the second comparing device and the voltage-follower control device for outputting the potential-calibrating signal in response to the potential-control signal, a detecting device electrically connected with the voltage-follower device and the voltage-follower control device for detecting the counting signal, the potential-calibrating signal and the pulse signal to obtain an extreme signal, an operational device electrically connected with the detecting device for operating the extreme signal to output an average signal, a signal converter electrically connected with the operational device for executing a signal-converting procedure by inputting the average signal to output a dynamic reference-voltage signal, and a pulse generator electrically connected with the voltage-follower device and the detecting device for producing the pulse signal to obtain the dynamic reference-voltage signal.
Certainly, the input signal can be an analog signal.
Certainly, the input signal can be a waveform signal obtained from a photoelectric convertion.
Certainly, the first comparing device can be a comparator.
Preferably, the comparator compares the input signal with the reference-voltage signal and obtains a first-state digital signal while the potential of the input signal is larger than that of the reference-voltage signal and a second-state digital signal while the potential of the input signal is smaller than that of the reference-voltage signal.
Preferably, the second comparing device further comprises an upper comparator and a lower comparator.
Preferably, the index signal further comprises an upper index signal outputted from the upper comparator and a lower index signal outputted from the lower comparator.
Preferably, the potential-calibrating signal further comprises a potential-calibrating upper signal and a potential-calibrating lower signal.
Preferably, the upper comparator outputs the upper index signal in response to the input signal and the potential-calibrating upper signal in the second comparing procedure.
Preferably, the lower comparator outputs the lower index signal in response to the input signal and the potential-calibrating lower signal in the second comparing procedure.
Certainly, the upper index signal and the lower index signal can be digital signals.
Preferably, the second comparator compares the input signal with the potential-calibrating signal for obtaining a first-state digital signal while the potential of the input signal is larger than that of the potential-calibrating and a second-state digital signal while the potential of the input signal is smaller than that of the potential-calibrating signal.
Preferably, the voltage-follower control device further comprises an input-voltage-tracing circuit and an up/down counter electrically connected with the input-voltage-tracing circuit.
Preferably, the input-voltage-tracing circuit outputs the counting signal in response to the index signal.
Preferably, the up/down counter outputs the potential-control signal in response to the counting signal in the operational procedure.
Preferably, the operational procedure further comprises an upper count procedure and a lower count procedure.
Preferably, the voltage-follower device further comprises a voltage-dividing serial resistor and an analog multiplexer connected with each other.
Certainly, the voltage-dividing serial resistor can comprise a plurality of series-connection resistors and divides an outer-voltage region into a plurality of potential regions.
Preferably, the analog multiplexer adjusts contacts between the analog multiplexer and the voltage-dividing serial resistor and obtains desired potential regions in response to the potential-control signal.
Preferably, the extreme signal further comprises a relative maximum signal and a relative minimum signal.
Certainly, the relative maximum signal and the relative minimum signal can be serial signals.
Preferably, the detecting device further comprises an extreme detecting circuit, a maximum latch and a minimum latch, wherein the maximum latch and the minimum latch connect to the extreme detecting circuit respectively.
Preferably, the operational device further comprises an average device and a signal-latch circuit.
Preferably, the average device outputs the average signal in response to the relative maximum signal and the relative minimum signal.
Preferably, the signal converter further comprises a voltage-dividing serial resistor and an analog multiplexer connected with each other.
Certainly, the signal-converting procedure can be a procedure of converting a digital signal into an analog signal.
Certainly, the operational procedure can be a procedure of obtaining an arithmetic average of the relative maximum and the relative minimum.
According to the present invention, a voltage-comparing device for comparing an input voltage with a reference voltage comprises a comparing circuit having a first voltage-input end, a second voltage-input end and a voltage-output end, wherein the input voltage and the reference voltage are inputted respectively through the first voltage-input end and the second voltage-input end, an output voltage is outputted at a first level value while the value of the input voltage is larger than that of the reference voltage, and an output voltage is outputted at a second level value while the value of the input voltage is smaller than that of the reference voltage, and a feedback control circuit electrically connected between the voltage-output end and the first voltage-input end to adjust the input voltage down a noise-enduring value for preventing the voltage-comparing device from the disturbance of the input voltage.
Certainly, the comparing circuit can be an operational-amplifier circuit.
Preferably, the first voltage-input end connects with a resistance device in parallel to convert an input current into an input voltage; and the feedback control circuit electrically connects with the voltage-output end and the resistance device to reduce the total resistance value of the resistance device for adjusting the input voltage down a noise-enduring value while the voltage-output end outputs the output voltage at the second level value.
Preferably, the resistance device further comprises a first resistor and a second resistor connected with the first resistor in series; and the feedback control circuit is a control switch electrically connected with the voltage-output and connected with the second resistor in parallel to short the second resistor for reducing the total resistance value of the resistance while the voltage-output end outputs the output voltage at the second level value.
Preferably, the control switch further comprises an inverter connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate electrically connected with the inverter and a source/drain electrically connected with the second resistor in parallel to be conducted in response to the conducting-voltage output value, thereby shorting the second resistor to reduce the total resistance value of the resistance.
Preferably, the resistance device further comprises a first resistor and a second resistor electrically connected with the first resistor in parallel, the feedback control circuit is a control switch electrically connected with the voltage-output, and the second resistor is serially connected to the ground to conduct the resistance device while the voltage-output end outputs the output voltage at the second level value, thereby connecting the second resistor with ground and reducing the total resistance value of the resistance device.
Preferably, the control switch further comprises an inverter electrically connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate electrically connected with the inverter and a source/drain serially connected to the ground for conducting the control switch in response to the conducting-voltage output value, thereby connecting the second resistor to the ground to reduce the total resistance value of the resistance device.
Certainly, the input current can be the current produced from an emitter of a phototransistor.
According to the present invention a voltage-comparing device for comparing an input voltage with a reference voltage, comprises a comparing circuit having a first voltage-input end, a second voltage-input end and a voltage-output end, wherein the input voltage and the reference voltage are inputted respectively through the first voltage-input end and the second voltage-input end, an output voltage is outputted at a first level value while the value of the input voltage is larger than that of the reference voltage, and an output voltage is outputted at a second level value while the value of the input voltage is smaller than that of the reference voltage, and a feedback control circuit electrically connected between the voltage-output end and the second voltage-input end for adjusting the input voltage down a noise-enduring value while the voltage-output end outputs the output voltage at the first level value, thereby preventing the voltage comparing device from the disturbance of the input voltage.
Certainly, the comparing circuit can be an operational-amplifier circuit.
Preferably, the second voltage-input end electrically connects with a resistance device for obtaining a partial voltage from a steady-voltage source to provide the reference voltage and the feedback control circuit electrically connects with the voltage-output end and the resistance device to reduce the total resistance value of the resistance device for adjusting the reference voltage down a noise-enduring value while the voltage-output end outputs the output voltage at the first level value.
Preferably, the resistance device further comprises a first resistor and a second resistor connected with the first resistor in series; and the feedback control circuit is a control switch connected with the voltage-output end and connected with the second resistor in parallel to short the second resistor for reducing the total resistance value of the resistance while the voltage-output end outputs the output voltage at the first level value.
Preferably, the control switch further comprises an inverter connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate electrically connected with the inverter and a source/drain connected with the second resistor in parallel to short the second resistor to reduce the total resistance value of the resistance device while the voltage-output end outputs the output voltage at the first level value.
Preferably, the resistance device further comprises a first resistor, and a second resistor connected with the first resistor in parallel, the feedback control circuit is a control switch connected with the voltage-output end, and the second resistor is connected to the ground in series to conduct the resistance device while the voltage-output end outputs the output voltage at the first level value, thereby connecting the second resistor with the ground and reducing the total resistance value of the resistance.
Preferably, the control switch further comprises an inverter electrically connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate electrically connected with the inverter and a source/drain connected to the ground in series for conducting the control switch in response to the conducting-voltage output value, thereby connecting the second resistor to the ground to reduce the total resistance value of the resistance device.
Certainly, the input voltage can be obtained from an input current crossing a ground resistor and the input electrical current is the current produced from an emitter of a phototransistor.
According to the present invention, a voltage-comparing device for comparing an input voltage with a reference voltage, comprises, a comparing circuit having a first voltage-input end, a second voltage-input end, a voltage-output end and a voltage-offset end, wherein the input voltage, the reference voltage and an offset voltage are inputted respectively through the first voltage-input end, the second voltage-input end and the voltage-offset end, an output voltage is outputted at a first level value while the sum value of the reference voltage and the offset voltage is smaller than the input voltage, and an output voltage is outputted at a second level value while the sum value of the reference voltage and the offset voltage is larger than the input voltage, and a feedback control circuit electrically connected between the voltage-output end and the second voltage-input end for adjusting the offset voltage down a noise-enduring value while the voltage-output end outputs the output voltage at the first level value, thereby preventing the voltage comparing device from the disturbance of the input voltage.
Certainly, the comparing circuit can be an operational-amplifier circuit.
Preferably, the second voltage-offset end electrically connects with a resistance device to obtain the offset voltage from a steady-voltage source to provide the offset voltage, and the feedback control circuit electrically connects with the voltage-output end and the resistance device to reduce total resistance value of the resistance device for adjusting the offset voltage down a noise-enduring value while the voltage-output end outputs the output voltage at the first level value.
Preferably, the resistance device further comprises a first resistor and a second resistor connected with the first resistor in series, the feedback control circuit is a control switch connected with the voltage-output end and connected with the second resistor in parallel to short the second resistor for reducing the total resistance value of the resistance device while the voltage-output end outputs the output voltage at the first level value.
Preferably, the control switch further comprises an inverter electrically connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate electrically connected with the inverter and a source/drain connected with the second resistor in parallel to short the second resistor for reducing the total resistance value of the resistance device while the voltage-output end outputs the output voltage at the first level value.
Preferably, the resistance device further comprises a first resistor and a second resistor connected with the first resistor in parallel, the feedback control circuit is a control switch electrically connected with the voltage-output, and the second resistor is connected to the ground to conduct the resistance device while the voltage-output end outputs the output voltage at the first level value, thereby connecting the second resistor with the ground and reducing the total resistance value of the resistance device.
Preferably, the control switch further comprises an inverter electrically connected with the voltage-output end for converting the second level value into a conducting-voltage output value, and a MOS transistor having a gate connected with the inverter and a source/drain connected to the ground for conducting the control switch in response to the conducting-voltage output value, thereby connecting the second resistor to the ground for reducing the total resistance value of the resistance device.
Certainly, the input voltage can be obtained from an input electrical current crossing a ground resistor and the input current is the current produced from an emitter of a phototransistor.